Fix parsing locations with port numbers.