If search is visible, hide it rather than go 'back'

Change-Id: I664c3490b72d9a484dd06585dbe037987f018a5c