fix Issue 9623 - Illegal Win64 linker optimization?

- ICF might break pointer comparison for COMDAT data/functions

- enabling REF also for debug builds removes the unreferenced
  NULL pointers in .minfo and ._deh