Merge doc touch-ups and fixes for #9831 and #9223 from 3.1