Fix NPE in full text search

This is more a workaround. Ideally, this should be fixed on the API level.
It looks like the two lists we're getting from search are sometimes not in sync.

Change-Id: I3cdc931194bf882ab3debdf938c41a2f7ea5478e
Merge "Fix NPE in full text search"