Issue 12704 - typeof function literal incorrectly infers attributes

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