When checking capabilty equality, and capability is a list, sort