Keilim18: 8
תְּפִלָּה אַרְבָּעָה כֵלִים, הִתִּיר קְצִיצָה הָרִאשׁוֹנָה וְתִקְּנָהּ — טְמֵאָה טְמֵא מֵת, וְכֵן שְׁנִיָּה, וְכֵן שְׁלִישִׁית. הִתִּיר אֶת הָרְבִיעִית — טְהוֹרָה מִטְּמֵא מֵת, אֲבָל טְמֵאָה מַגַּע טְמֵא מֵת. חָזַר לָרִאשׁוֹנָה וְהִתִּירָהּ וְתִקְּנָהּ — טְמֵאָה בְמַגָּע, וְכֵן שְׁנִיָּה. הִתִּיר אֶת הַשְּׁלִישִׁית — טְהוֹרָה, שֶׁהָרְבִיעִית בְּמַגָּע, וְאֵין מַגָּע עוֹשֶׂה מַגָּע.
[Regarding] a tefillin [consisting of of] four utensils: [If] one separated the first compartment and [then] repaired it, it is tamei with corpse-tumah, and the same applies to the second [compartment], and the same applies to the third [compartment]. If he separated the fourth one, [the tefillin] is tahor from corpse-tumah, but it is tamei with tumah [due to] contact with a t’mei meis. If he went back to the first [compartment] and separated it and then repaired it, it is tamei due to contact, and the same applies to the second [compartment]. If he separated the third [compartment], [the entire tefillin] is tahor, because the fourth one is [only tamei] as a result of contact, and [an object contaminated through] contact [with an av hatumah] cannot create [tumah through] contact [with a utensil].