Added index method to InstructionGroup

Makes it possible to get the index of an instruction in an InstructionGroup. This is useful if you want to remove an instruction, do something with it, then put it back in the same place.