Changed vehicle state predicates so that they take a vehicle record as argument, rather than id.