Added check to location setter that makes sure to stop a location-loop forming. This closes #454.