model: Fix memory leaks

One introduced in

  05a5a2f44fcd6c3b1bc9d4581e4b7955e805987e

since instructions are allocated multiple times, but never deleted.
The other has been there for a long time...