One of my dogs does that , and what i have worked out is that she is licking up hair and dust! She licks and licks until she is sick,so i think its the same as when they eat grass to make themselves sick.
Once she sicked up a massive hairball. It must have been building up over the months, then she was fine once she'd got rid of it.
When she starts the licking, nothing will stop her, just as you've described with your little one.