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