I own one, big old boy at that. He has never done this but I would not worry to much about it. He isn't really going to harm himself this way.

How old is this snake and had he fed recently?

They are fricken psyco feeders they about inhale food. If he had been fed recently and was still hungry perhaps some scent was on his body from the last feed.

Don't worry he isn't going to eat himself and he is immune to his own venom so no worries. Young snakes do some dopey things! I have seen young corns distory a pinky, basicly pop it and mangle it till they can't eat it and you have to give them a new one. This happens because they try to eat it sideways.

He will figure it out, just feed him really good. They grow like crazy in the first 18 months and have a need for more food then rat snakes and the like 2-3 meals a week may be what he needs.

Metabolicly they are a lot more like garters and cribos etc. Active during the day, etc. They eat a LOT