ModeShape/modeshape — pull request #648 by hchiorean (2013-01-17 14:40:10+00:00)
Title: MODE-1751 - Updated the algorithm via which nodes update their referrers as result to changes in reference properties.

The change was needed because the previous version of the code did not take into account "no-op" updates to the same property. which resulted in turn, into an erroneous increase in the reference count.

Fixing this issue exposed another "hidden" bug: there is a very rare case, when within a transient session, references towards nodes in another ongoing transient session are created. This is the case when a node is made versionable. The bug was exposed by the TCK _VersionHistoryTest_. To fix this issue, the _MutableNode_ interface was updated to handle this particular case.