Fixed bug that caused RWLock not to free up entries in txLockElementMap.

The mark flag is used to guard against creating multiple RWLocks for the same resource and has nothing to do with TxLockElement entries.

TxLockElement creation and removal is still safe since it is synchronized on the RWLock.
Merge pull request #2450 from johan-neo/1.9-maint

Fixed bug that caused RWLock not to free up entries in txLockElementMap.