Compiler: Improved variant dispatcher.

Inherited dispatchers and the ::-operator now work in some cases.