Compiler: Fixed bug in handling of local::.
Compiler: Fixed overriding of variant functions.

Overriding of variant functions now seems to work as intended.

Also adds testsuite test that checks some of the cases.