Remove some overcomplicated and broken code in QMapReg.

We can do similar optimizations later anyway.