Since the velocity estimate is made only based on the last position of the snake, a very large jump in position could jump too far away from the snake. What is really the problem is that I'm only estimating velocity, not acceleration. If there is a really big acceleration, the object will move out of the snake's region. If I were to pay attention to acceleration, I could lessen this problem. If the object is moving at a reasonable speed, the position estimation algorithm can track the object.
Faster movements require a more sophisticated approach.
The author asked me not to make the code publically available as it was developed as research for a company project.