correct substitute itself constraint detection (refs #4281)