On my longer casts I keep having the problem that when I release my cast my line goes out fine but the last little bit of it seems to almost always get wrapped around the butt of the rod (only once around though). Its only on cast 50ft+. Shorter casts I do not have this problem. I drew up a diagram of my problem. Its very primitive so bare with me please.

There must be a cure but after a long haul with fly rods this still happens to me now and then. I remedy it but I could not tell you how I do it...................... For me this is an unsolved mystery of the cast.

I feel your pain and battle this often. If I'm consciously thinking about it while casting I can prevent it but if my mind drifts or I'm really focused on the presentation then I often find it happening.

This is a casting fault that used to happen to me also. Now it almost never does.

The reason that this happens is that your line hand is too close to the fly rod when you release the line to shoot it on a longer cast. When you release the loose line, the line is pulled toward the stripping guide on the reel. If the line hand is close to and/or behind the reel or the rod but, the line may loop around the rod butt.

Note that you said it happens on longer casts and this problem typical occurs when shooting line. Sometimes the line will also loop around the reel.

Remember that the loose line is drooping down from your line hand so it it must fly up in a loop toward the elevated rod once you release the line. Keep your line hand and rod hand apart as you cast. That will cure the fouling of the line.

I bet that when the line wraps around the rod, you dropped the line. I almost never do unless I want extreme distance. I use the O-ring method that Gary Borger taught me. By keeping my left line hand away from my right rod and and shooting line through an O-ring in my left hand, I keep the shooting line away from the rod and reel.

When you drop the line, it is free to fly up to the rod uncontrolled. It is only when I want to cast at my maximum and want to eliminate the friction from the O-ring that I drop the line from my left hand at the shoot.

At the end of the cast, I close the O-ring and I have immediate control of the line in my line hand. I do not need to grab for it and my attention remains on my fly.

Bingo with the 0-ring technique, a fix that is taught by many instructors. Think of it as another guide that is under your control to control the direction and the length of the line being shot to the rod.
Yup... another item in the long list of items under the title, Line Control.

funny this came up...
i was fishing at a nearby lake today and was having a horrible time with line tangling around my reel seat and reel handle.
at the time i didn't think much about it and kinda blew it off, just a bad day.
but now thinking back to this afternoon, there was a pretty stiff breeze blowing the whole time i was fishing.
i was making some long casts and had a good bit of stripped line at my feet.
so i'm gonna say that a bit of wind combined with a pile of fly line = problems.