Firstly evaluated that assert, it's benign as far as I can tell. A hangover from an earlier way of getting data to/from the patch when I used to pass the GeoPatches pointer around with the request.
It did lead me to a couple of cases though where things weren't being cleaned up if finding a GeoSphere or GeoPatch should fail.
Also I've added some more sanity checking.
Merge remote-tracking branch 'fluffyfreak/Fix2262'