Found my own mistake: In module Test0 the "import of std.stdio" caused the error. There was nothing in the exports which required elements of std.stdio and somehow (don't know why) it caused ModuleInfo to be incomplete or omitted.