Merge pull request #1633 from 9rnsr/fix9461

Issue 9461 - Ability to break typesystem with `inout`
fix Issue 6539 - Incomprehensible error message with failed template instantiation