Backport PR 3728