This patch fixes #12104 as well.