The meforshim use this as an example of how an inadvertant statement by a tzadik can cause later problems. That is, Yaakov had no idea that she had taken it and the condition used was not fulfilled. However, "the word of the tzadik is important". Thus, when Rachel was in danger (giving birth) this statement by Yaakov was included in the judgment and contributed to her death. See the Art Scroll commentary to Vayishlach 35:16 - 20 which expresses this concept explicitly.
The gemora gives other examples of a tzadik making an innocent statement which has a bad effect later on. I asked my Rav and he pointed to Kesuvos 23a (ArtSroll 23a4).
Some captured women came to the Nehardea to be ransomed. The father of
Shmuel placed guards on them so that they would not be violated.
Shmuel asked, who was guarding them until now (what is the point of
guarding them since they were alone with the captors until now)? He
answered and would you treat your daughters this lightly?
הואי כשגגה דיצא מלפני השליט
This was like a ruler accidentally giving an order and the daughters
were captured and taken to Eretz Yisrael to be ransomed.