When detecting the machine guest, first sort the guest plugins by the number of ancestors. This allows for returning on the first match instead of requiring running the detection process on every registered guest plugin.