Fix #347, unload by equality instead of dimensionId

Signed-off-by: Ross Allan <rallanpcl@gmail.com>