Merge 5.0.1 into 5.1

Currently 5-0-stable and 5-1-stable have diverged, which means you can't move from 5.0.1 to 5.1 with a `git merge`, which we need due to local changes.

Steps to reproduce:

    git checkout 5-0-stable
    git merge origin/5-1-stable