Fix memory management bug

... which we are hitting only due to other redesigns.
Merge pull request #702 from linas/multispace

Fix memory management bug