Fixed naming.best_naming to better handle synonyms