Import as develop

This is a manual rebase of #1566.
The first commit from #1566 has been omitted (already in develop) and the last commit is already in dev_4_4 but was not in develop

--rebased-from #1566