The replace mesh code was still calling release() on the parent object when it no longer needed to (due to earlier commits).