Pattern loop check