[MERGE] Forward-port of latest 7.0 bugfixes, up to aeaa826