Re-apply the change from r191393 with fix for pr17380.