You say that your solution works 80% of the time - how do you know that? Do you have any ideas for why it wouldn't work for the other 20% of the time? Here are some of my thoughts -
1. Not all of your leads will likely be generated by Google (organic or paid). Are you taking into account that visitors who come from a link on another website and fill out the form should not be tracked as Organic or PPC? It looks like your script is determining every visitor who doesn't come from AdWords should be counted as Organic, and that may be what is causing the discrepancies in your data.
2. What about visitors who come from a search on Yahoo or Bing? Are they being tracked as Organic in your script?
3. It's possible that some of your visitors have cookies and/or Google Analytics disabled so I can see that messing up your data if you are checking the GA cookie.
I can definitely understand the value in passing the source info along through your form, but it looks like your script might need a little finetuning to track more accurately. I have actually ran into similar issues before with trying to pass the source of the lead through the end of the sales funnel so I can determine which traffic sources/keywords generated conversions that resulted in sales without needing a full blown CRM and developed a free tool called Convertable which does exactly what I was looking for. If you are still having problems with your script, feel free to give it a try.