Another try to fix a stubborn memory leak