Fix passing Refs via ptrcall
Created by: endragor
There was no constructor for Ref from const pointer, so compiler decided to construct Variant from pointer and then construct Ref from Variant which turned it into NULL, because the Variant had null ref field.