Go: fix overload functions with polymorphic

This bug can be re-produced when one of overloaded functions accepts a pointer to BaseClass but a pointer to DerivedClass is passed, and finally leads to application's crashing.

Test case is also included.