fixes #12434 (stable7)