Solr count mismatch between facet and filter query

Apparently, the collapse query selects one of the documents in the group as a leader and selects it for counting facets, and in one of the group, the leader which was getting selected didn't have the field considered for facets.