Mad props to JoshPet for pointing out an error in the way that locked threads were handled in the templates! I've solved the problem and the zip in the first post has been updated. The only files that I had to change were showflat.tmpl and showthreaded.tmpl
Edit: I had to fix yet another bug in the locked theads view. The first post has been updated.