backport to stable7