[#4050] Backporting some additions to 2.3