Make module aliases work in functor arguments

Seems to work fine on my limited tests.