Add a `max_leases` consistency check to the semaphore recipe.