Fixed 13871

This is a quick fix for [13871](https://issues.dlang.org/show_bug.cgi?id=13871).
Unfortunately I don't fully understand the root of the problem yet. Will investigate it more. Meanwhile this PR seems to fix it.