fix ext plugin sort to account for out of order priority definitions

tests pass for me, LMK if other edge cases occur