minimal revert of the double delete introduced by 10a2578 (#1849)