Improving error handling when a locality is registered more than once.