I have a barrel horse that seems to do that on occasion. What I do is place a cone about 4-6 feet from the barrel, where you are entering the 'pocket'. It sounds like your horse is so caught up with the pattern that he forgets to check himself. Walk the barrel course and stop him on the outside of the cone. This is where he needs to check himself. Do this and say "check". Eventually you wont need to stop him, he will check himself (put himself in the right positsion). This spot is also where he will begin the 'snap' around the barrel. This is where 'checking' comes in handy. Once he is checking himself, increase to a trot, canter and finally the finished run. I hope this helps. This should get him back on track and away from the barrel.
Sorry if this was confusing. Its easier to show then to tell someone