TypeAgent did not search for class type (fixes #904)

DCA is not loaded when cache is built, we have to use the fields to
check if there’s a type column. Otherwise HAVING would not be added