Fixes KML before loading, to avoid common problems found in external KML sources.