[3.6.x] Cherry-pick more relevant changes in master for 3.6.2

This is an essentially cosmetic change.
The reason I needed it was that auto-reindenting Mark's branch did bogus things - it wanted to indent the `#else`'s if as a subordinate of the `#if`'s one and, consequently, indent the following block one more layer than it deserves.
There is no material value to it, nor any compelling reason to take it into 3.6.x; however, there is equally no harm in it.