Bake command changes animation

When I bake a particular animation, some bones motion becomes … wonky …

file:
[http://www.geocities.com/z3r0_d/files/badBakeResult.zip

the regular animation is alwright
after baking the same animation changes (for the worse)
and the bake result is bad too (but different from the aforementioned bad)

(look at the legs, it is more obvious there)

the problem seems in part related to the rotation keys on the upper leg bones which I used to control where the knee points. Is there a prefered method that would be easy to work with.

(I was doing this animation for the request for ledge climbing on the realtime forum, I was going to work on the gamelogic and python when I had completed the animations [this, jumping, and a walkcycle at least]

Uhh, updates

Ok, so I have tried making a new upper leg bone, and having it’s parent the one with the rotation keys (ik doesn’t pass between them) and I still have the same problem.