I can’t help you with the problem, sorry, but you might be better off asking on the osm-geocoding mailinglist ( http://lists.openstreetmap.org/listinfo/geocoding ) as you are probably more likely to find experts on the topic there than here.