Chose the best alias when many apply (fixes issue #227)