Is this patch OK to merge to the 4.0 branch?
Yes. What do I need to do?
You can use the utils/release/merge.sh script to merge to the release_40 branch. It looks like one of the tests need to be updated too.
Committed it (with an updated test) in r301550.