Handle layers with the same name in tools.