added CHAINMEM test
added missing prepare() in debug.py
fixed error on SWAPping arrays when a variable of the same name exists