Implement spec changes for DIP65

https://issues.dlang.org/show_bug.cgi?id=12558
https://issues.dlang.org/show_bug.cgi?id=10247