Fixed a bug that would cause infinite loop if instruction is referring itself as operand.