Fix bug with diminishing before minor-mode registration