Hello and sorry for the late reply due to xmas vacation.
No matter how much I try, I am still unable to somehow reproduce a similar error from coming up. With that said, does replacing reference == null with ReferenceEquals(reference, null) solves the problem on your end? Doing this bypass the custom UnityEngine.Object op_Equality comparer that seems to be the cause here.