Imagesets should be cleared only if they have been instanced. Fixes #27.
Merge pull request #30 from Falc/issue-27

Fix #27