Tracking down a Zsh history data loss bug