After numerous attempts at narrowing this down, we could not find the cause. It really only appears to occur at exit time, so it's a minor issue. In case anyone else hits this or wants to try to reproduce, the attached test script should be able to produce the issue.
testloop.sh
Description: Bourne shell script