Replace OnRecordType/OnGetDef with OnKnownBody
refMapUnmaintainedLookup returns the ref key it found by
Remove Optimize and facilitating functions