Partial revert of previous commit: DerivedMesh should be released by
setting needsFree and then calling dm->release.