Issue 12598 - Emit better diagnostics when type is found where an lvalue was expected

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