Merge fixes from 8.1 into develop.
Note that the 8.1 release will be done later, so more fixes can still be incorporated into the hotfix-8.1 branch after this MR is accepted.