you never wnat to overextend the efllector! it does not mean you cant get the leg to go straight anyway. You just dont want to overextend the ik efflector further than what the leg can reach.
WHY? well the answer is a bit techy, it can be solved but can end up beign realy tedious. Well its because you use a a worldspace efflector that interpolates its move. now when you reach very close to the edge of your reach or beyond you dont have controll anymore whan this extenzssion happens, because it gets straigfht the second your efflector is further than your bone can reach (and thats not neccesery the monment you key for it to straighten). Also theres no easing this unless you key so that the key is exactly where your full extension is.
NOw for the problem because you interpolate the samples its realy easy to place thekeys so that the actual distance maximum does not happen ON the key but rather off it, on the span connecting the next key. now what thid means is that the delta movement of the leg suddenly is out of controll. Usualy visualizing as a very fast snap.
It took me a very long time to figure all of this out on my own tough so its not something readily apparent.
Then on the bone structure. Well human knees are actualy very tricky. IK can never realy confrtably bend like the human knestructure does because it can not solve over turning. To this end one can however use bonstructures taht are actualy a bit skewed worng. If you place extra satic bone in midbone you can compensate for this... but thats a dirty trick.
Anyway straughtening your leg is not something people usualy (some people do this agreed especialy parading russian military personell) do untill they plan to actualy stop, they almost straighten but not quite (this is actualay a tragic mistake most people do when they happen in a accident shatrtering the leg in thousands of pieces, personaly i succeded to do this with my right arm a long time ago, damn locking joints... it healed but the experience of having your elbow where your shoulder should be is something that could have been avoided with a few hours of ukemi training!).