Upstream PR raised: https://github.com/D-Programming-Language/dmd/pull/5122 Doesn't fix the problem, but at least ensures that the code generator has all information it needs to do the right thing.