We experience this at times too, but I don't think it's related to any specific type of assignment. Instead, it seems to be a course-wide thing.
What I have seen, over time, with ours is that the same exact courses do it every time. We have some courses that have never done it, but some that do it every time. I don't know if there may have been any sort of bug in Moodle when we initially set those up or what. However, I can reliably back-up/restore a course that does not have this problem into a brand new course and it still works fine. As such, I can also back-up/restore a course where this consistently happens into a brand new course and the same problem will exist in the new course. And it hasn't mattered in our case whether it's an upload, online text, etc.
A couple of months back I noticed someone had filed a bug report on this and I had tagged it with my comments as well. However, it's listed as a low priority, so I don't know if/when it'll be gotten to.