Check to prevent multiple registrations of mimedetectors. Fixes #291