Fix various issues related to building the IR

- Enables previously disabled test (run/transient2.scala)
- Fix an erroneous test that expected duplicate fields
  (run/singleton-hierarchy.scala)
- Improve compilation speed