Some cleanup (already in 3.8.14.1) from PR #1286