Merge pull request #2491 from hpohl/10862

fix issue 10862 - Assignment inside if condition still sometimes accepted
10610 ICE with CTFE after failed template

This is an error propagation bug. Class.staticmember should become
an ErrorExp, if Class was a failed template instantiation.
Merge pull request #2495 from donc/ice10610ctfe

10610 ICE with CTFE after failed template
fix issue 10329 - Attributes not inferred for indirectly templated
methods