Do not registerGadget more than once for an ID. Add tests for this.