Make `getUniqueAliases()` helper function more readable