[JENKINS-64040, JENKINS-64136] Fix hidden page elements from radio blocks showing up when they shouldn't (#5046) (cherry picked from commit ffe0fa8a)