BUGFIX - Reference loop checking (check reference, not equality)

Reference loop checking's use of List<T>.IndexOf() performs an equality comparison, and not a reference comparison. 

Serializing object hierarchies with custom Object.Equals() overrides may falsely trigger reference loop exceptions.

Proposed fix attached.