MIFOSX-1533: Fix advanced search exception

This was done as part of:
http://www.google-melange.com/gci/task/view/google/gci2014/5254059162337280