Prevented a possible recursive loop when the pattern config was a certain type of regular expression.