Pesachim 9b: If there were nine piles of matza and one pile of chometz, and a mouse came and took from one of the piles, and we don’t know which one – this is the same as the case of “the nine stores”, where we apply the rule of “kavua” and treat it as a 50-50 chance. If a piece got separated from the piles and then the mouse took it – then we follow the majority.
פסחים ט ע”ב: תשע ציבורין של מצה ואחד של חמץ, ואתא עכבר ושקל ולא ידעינן אי מצה שקל אי חמץ שקל ־ היינו תשע חנויות. פירש ואתא עכבר ושקל ־ היינו סיפא. דתנן: תשע חנויות, כולן מוכרין בשר שחוטה ואחת מוכרת בשר נבלה, ולקח מאחת מהן ואינו יודע מאיזה מהן לקח ־ ספיקו אסור. ובנמצא הלך אחר הרוב.
One day in 1949, a woman in Jerusalem went to her freezer to get some margarine to fry schnitzel in. In the freezer there were four identical packages. She took from one at random and used it. Later, she remembered that three of the packages were margarine and one was butter. She rushed to ask Rabbi Tzvi Pesach Frank if the schnitzel was permitted.
Rabbi Frank argued that this seems to be a case of קבוע למפרע, when at the time of the taking, the taker was unaware that one of the “stores” or sources was forbidden, but only realized this in restrospect. The Ran permits such a case, but the Rashba and Ra’ah disagree (Shach 110:14).
Combined with the Ran, we have another reason to permit it: the butter was not forbidden – the problem only began later when she cooked it with chicken – so this is not a case of קבוע. Kavua only applies to an issur. Precedent for this can be found in the Pri Megadim 110 Sifsei Daas 37, who is uncertain as to whether the rule of kavua applies to chometz before Pesach, while it is still permitted. The case of the butter is better than the chometz, for two reasons: 1) Chometz even before Pesach will forbid an endless chain of dishes and foods that touch it (נ”ט בר נ”ט דאיסורא) whereas butter will only affect the first item in the chain, not the second (נ”ט בר נ”ט דהתירא). 2) Chometz is forbidden to nullify even before Pesach as per the rule that אין מבטלין איסור לכתחילה, whereas milk is permitted to nullify in water and later mix into meat (Tzlach in Beitzah).
Furthermore, even the Rashba and Ra’ah, who apply kavua even retroactively, only forbid it as a 50-50 safek. In the case of the schnitzel, the entire issue would only be a Rabbinic prohibition of chicken with milk. Therefore we can apply the rule of תולין, brought in Yoreh Deah 111, that when there are two possibilities of what could have fallen in, with Rabbinic prohibitions we assume the permitted one fell in. However, the pan should be kashered because it is a דבר שיש לו מתירין – there is a way to render it permitted.
Source: Har Tzvi Yoreh Deah 99