Re #8614 & Re #9061. Bring all changes over from these tickets.

Since none of the affected files have been changed by any other
tickets since the release, it is OK to bring over their current
state (in master) in one shot.
Merge branch '9061_and_8614_LET_reduction' into release/3.1.x