[geolocation] Fixes for bugs 1029326 and 1022635

Feels like this should be indented out.