integrate skolemization pass with flattening