Hmm, I can reproduce. It is caused by the call to pack in function 2. void f2() { unpack(pack(mpObj)); } I get the feeling this may be a compiler bug, I'm not seeing anything used that isn't part of those two files or Phobos.