Added an assertion for testing that a released shape was actually present.