Just a random thought - have you edited the file with Sigil? If not, try that. There was a problem in another thread where the end of the chapter was "missing", and it was caused by a mismatch (on some <div> tags from memory). Sigil fixed that automatically when it opened the file.
Can you share one of your problem epubs so some other eyes can look at the structure?