Fixes #96491. Update fix for #96262 to a simple revert of the problematic commit, as the upstream fix is still being debated and caused other issues. Also include fix for upstream regression 2715 added in 0.14.9.