Add tests for dynamic getters deallocating

Verified to fail against the current 2.0-development branch.