Repeating sequences of instructions detection