Catch invalid location.distance tags

and fail cleanly