Fix exception while bubbling titles

In prefix search if the search text is actually a title we make sure it is at
the top of the results.  But if it isn't a valid title we shouldn't blow up
because blowing up is bad.

Bug: 72260
Change-Id: I5bd795df447a33bb003a38ec2068dc184379a813
(cherry picked from commit 2c121e0f67093c2213000b74a6260cd3fd113660)