If you have a class and a subclass with equal priority (bad, but that's the case with most text/plain cases right now), then it's possible to find the subclass first and *then* the parent class, resulting in a application/octet-stream return from test-mime rather than the subclass.
Created attachment 7956 [details] [review] Patch to correct the bug
Good catch! Thanks, committed. Sorry for the late response.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.