Fix reference leak

Fix long standing reference leak. All of zeros, ones, full, and empty were incrementing the reference count of the items in the dimensions list.

This should be backported.