Handle back button properly when overlay is open

Bug: 61722
Change-Id: Ic8389d4bdaa11e82b6274dbdfc154f93e62e6520