Work around some DMD codegen bug.

Using a lambda changes something about the returned interface reference (with no exact investigation).