Fix #1158 "Controls form: changing language causes JS error"