python: fix a memory leak issue when we stop enumeration over the disassembled instructions prematurely. patch by Jan Newger