Refactor code to find overlay target
am: c0957f2fa7

Change-Id: Iddb06e770f08e7138192bc898c973b39e833f6f6