We had to revert #13780 and #14026. These two PRs both fixed soundness bugs but the fixes broke too much code. We need to address the original bugs re-introducing these PRs after applying some fixes or complements to them.