introduce isEmptyScope and use it, update composer.lock