bug in template haskell (with recursion?)