Please apply commit 93bd4a80efeb to v6.6.y and v6.12.y