We should move this path so we don't end up allocating/deallocating twice. Fixes https://github.com/flutter/flutter/issues/142873