Small update: I've completed a rebase onto 5.x now, being careful not to allow the commits to introduce regressions. I just need to do some testing before I submit it...