7.x merge fixes by @rosiel, reverts a custom commit.