2nd try at fix Issue 12989

Pull https://github.com/D-Programming-Language/dmd/pull/3735 didn't fix https://issues.dlang.org/show_bug.cgi?id=12989 quite right. This should be correct.