Feature #2858: fix used leases counter