Fix code that checks for duplicate aliases.