Fix another bug resulting from caching of resolveAliases() grrr!
And a damn nasty-looking fix at that.