I stumbled onto this behavior by accident. This was supposed to be a simulation of perfectly elastic collisions. I believe the sticking behavior is caused by neglecting to account for overlaps during collision detection.