issue #986 - temporary workspace was being held by permanent workspace preventing memory from being freed