Should have commited on here and on merged master to begin with, but I didn't, so instead I cherry-pick. (cherry picked from commit 88c04a8b)