D1 Merge: bugfixes for 9982, 10211, 10252, 10551, and 10858

All five are identical to the corresponding D2 pull requests.