fix: in `add_inductive`, add ctors to the environment after rechecking parameters, not before (#16742)

This PR fixes a non-critical bug in `add_inductive` whereby constructors
of the type being defined could occur in parameters of nested
occurrences of said type. The context in which such a thing was accepted
is so restricted this could not lead to any soundness issue.

Closes #16736
2 files changed