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
Merge pull request #2374 from 9rnsr/fix10567

Additional fix for issue 10567 in order to generate correct TypeInfo