Merge branch release-5-1 into release-2016
There's an awkward clash with a bug fix from release-5-1 from
subsequent cleanup in release-2016 while it was still
master. Fortunately, the code path for bExchanged only happens when
!bTrotter, and all the other code paths require bTrotter (which has
several sub cases), so those two groups of code commute. (And the
implementation of checking what the inputrec requires has changed
between branches only in name.)
Change-Id: I2382dad5c484452d023524884c025e77c2a624c4