Fixed ByRef/ByVal magic method generation (should now be consistent with parent classes)