Introduce COMRef type that makes avoidance of COM calls easier but allows them when they are unavoidable.