Regression 10949: CTFE ICE after indexing error

When an error occurs during optimize(), propagate the ErrorExp.