[entropy.locks] set recursed to False only when the reference counter is 0