Backport DMD pull request #1760.

Fixes DMD test case 'xtest46'.