This reverts commit b3da6a6c as it reintroduces the original space leak.
mentioned in issue #13668 (closed)