Some ambiguous calls of map::erase have been prevented by adding additional check in locality constructor