dbda158f1f
Thanks go to Matthias Scheler <tron@lyssa.owl.de> for contributing his initial work in PR/3592, and to Christos Zoulas for refining it!