Merge "Throw IAE on invalid scale" into lmp-dev