I ran into the same issue a few times so what I do is copy the css file from the "My Shozam Themes" folder into the gallery after making any changes. Once I did that, if I only generate the gallery for changed files, then the problem went away. I also found that if I viewed the gallery after generating it, if I didn't empty the cache in the browser the issue would reappear.