Make cache entry comparison take the new "state" flag into account.