Entropy Resouce Locks are reentrant, thus reference counted on lock() and unlock() operations. For this reason, the counter must be increased on every lock() request. This did not happen if the lock was already held by the process with the unwanted effect of improperly releasing it. This caused the "Calculating dependencies" glitch on each package transaction.