correct checking for aliasses before trying a local name