Add test for worksforme bug 6405.

To prevent future regression for bug https://issues.dlang.org/show_bug.cgi?id=6405