Before this commit, the subst tactic was producing an type incorrect result when dependent elimination was needed (see new test for an example).