When stuck in that situation I will do one of 3 things.
1. Bring something with me to eat on the plane. (I do this even when I am on a flight that I know will have a kosher meal onboard.)
2. Suck it up and realize that these are the sacrifices that I make.
3. Many times I have noticed that one of the choices in Y is a sealed green salad. Even if I am sitting in F or BF, I will ask for the salad. I always get some funny looks when I turn down the fancy shmancy salad and soup up front and ask for the plain lettuce from the back but it is better than nothing.