[…]

which compiles with dmd 2.065 and gdc 4.9.1, but highlights a deep problem with ldc2 :-( However […]

For the record, ldc2 has been fixed and now the code compiles with it.