In Vayikra 24:10 it says:
"There came out among the Israelites one whose mother was Israelite and whose father was Egyptian. And a fight broke out in the camp between that half-Israelite and a certain Israelite."
And on this Rashi writes:
"A Baraitha states that ויצא means, he came out of the judicial court of Moses where he had been pronounced to be in the wrong in the following matter: although his father was an Egyptian he had gone to pitch his tent in the camp of the tribe of Dan to whom his mother belonged (cf. v. 11). They (the men of Dan) said to him, “What have you to do here" (lit., what is your character that gives you the right to come here?). He replied. “I am one of the children of the tribe of Dan”. Thereupon they said to him, “Scripture states: (Numbers 2:2) “Every man [of the children of Israel shall encamp] by his own standard, that bears the signs of their father’s house”! He thereupon went in to the judicial court of Moses to have the matter decided and came forth (יצא) declared to be in the wrong. He then stood up and blasphemed."
And the Mizrachi explains that each tribe decided to dwell separately so it would be possible to tell who was of which tribe and who wasn't of any tribe.
Seemingly, the reason the blasphemer was not allowed to dwell with Dan, the tribe of his mother, was because tribal heritage goes according to the father and his father was an Egyptian man. However, in Divrei Hayamim 1 2:22-23 it says:
"Afterward Hezron had relations with the daughter of Machir father of Gilead—he had married her when he was sixty years old—and she bore him Segub; and Segub begot Jair; he had twenty-three cities in the land of Gilead."
Why was Yair, whose father was from the Tribe of Yehudah and grandmother from Menashe allowed to lived among the Tribe of Menashe, but the blasphemer wasn't allowed to live among the Tribe of Dan?