trq-2143 Fixed a deadlock when deleting arrays.
Took out an unneeded recursion call.
Fixed a unit test.