Turns out that on my 32bit Ubuntu machine with GHC 7.4.2 32bit the code runs correctly. So my guess was that the problem lies either in the difference in OS or processor architecture.
After installing the 32bit Haskell platform the code compiles. Guess this is a bug in the compiler. I'll try to file a bug for this as well. Should this be done with GHC or template haskell?