Adjusting setLocationMode for global-variable conflict detection.