The most likely explanation is that the entity contains references to objects from other sessions, or that have been detached from the session.
Could you give us the code that led to this error? I.e. the code that changes entities and performs the update. Please try to give all the code that gets executed and that manipulate entities in this specific scenario.