These changes are also in upstream (and are wrong - mental note...)