Reworked opt.register_specialize to match the way opt.register_canonical...

...ize works.