Adds guard on amount of executed AVM1 instructions.

Fixes #122