In Parah 9:5, we read:
מֵי חַטָּאת שֶׁנִּפְסְלוּ, לֹא יְגַבְּלֵם בְּטִיט, שֶׁלֹּא יַעֲשֵׂם תַּקָּלָה לַאֲחֵרִים. רַבִּי יְהוּדָה אוֹמֵר, בָּטְלוּ. פָּרָה שֶׁשָּׁתָת מֵי חַטָּאת, בְּשָׂרָהּ טָמֵא מֵעֵת לְעֵת. רַבִּי יְהוּדָה אוֹמֵר, בָּטְלוּ בְמֵעֶיהָ:
Hatat water that became invalid, it may not be mixed into the mud since it might become a snare for others. Rabbi Judah says: it becomes neutralized. A cow that drank of the hatat water, its flesh becomes unclean for twenty-four hours. Rabbi Judah says: it becomes neutralized in its bowels.
הלכה ו: מי חטאת שנפסלו לא יגבלם בטיט שלא יעשם תקלה לאחרים שמא יגע בטיט ויטמא שמי חטאת אינם בטלין בטיט שנאמר חטאת היא:
Halacha 6: When sanctified water is disqualified, it should not be mixed with mud, so as not to create a stumbling block for others, lest they touch the mud and become impure. For the sanctified water does not become nullified in the mud, as implied by Numbers 19:9: "It is a sin-offering."
הלכה ז: פרה ששתת מי חטאת אף ע"פ שנשחטה בתוך כ"ד שעות בשרה טהור שנאמר למשמרת למי נדה בזמן שהן שמורין אינן בטלין אבל בזמן ששתאתן פרה בטלו שהרי אינם שמורין:
Halacha 7: When a cow drinks from sanctified water, its meat is pure even if it was slaughtered within 24 hours of drinking, as can be inferred from ibid.: "as safekeeping, as water for sprinkling." Implied is that when the water is kept safe, it is not nullified. If, however, a cow drank from it, it is nullified, because it was not kept safe.
However, I don't understand how it's possible to rule in the first case against R. Yehudah and in the second case with him. In particular, Rambam says (in halacha 7 above) that water that was "not kept safe" is indeed nullified. Water poured out into mud is "not kept safe", as far as I understand, yet he rules (in halacha 6 above) that the water is not nullified. How do we reconcile the two cases?