Fix some subtle bugs relating to -ddump-minimal-imports with -XOverloadedRecordFields