fix Issue 10073 - Default opEquals depends on class declaration order with DMD HEAD

Resolve forward reference correctly.
Additional fix for issue 10567 in order to generate correct TypeInfo