fix issue 10479 - cannot pass implicitly to base class casted result to
out contract by ref