Fixes #3688: Repaire JS broken in group and directive screens