Fix registration of controls in 1.7.  Fixes #372.