It seems wrong in general; it shouldn't be allocating ip leases at all, rather it should associate the ip lease container with the lease policy.