correct substitute itself constraint detection (refs #4281)
Merge pull request #1014 from Eric-Brison/3.2-I4281

correct substitute itself constraint detection (closes #4281)