India was divided on ethnic and geographic grounds, as well as religious, so differences beyond religion existed as well. Religion forms part of the identity matrix of people, just as race, ethnicity and geography do. You cannot arbitrarily dismiss one strong aspect of a peoples identity (religion) and claim that that particular community should be able to co-exist with Y community, and insist that another community, that is distinct on the basis of racial (and religious) identity is somehow completely incompatible.
At the end of the day our identities and how we see ourselves as distinct (be it race, religion, ethnicity, geography or a combination of these and other factors that form our identity matrix) is up to us, and not for an outsider to determine whether or not we are compatible or incompatible with Y community.