private function assertUniqueBaseName(PharInvocation $invocation, int $flags): bool
    {
        if (!($flags & static::UNIQUE_BASE_NAME)) {
            return true;
        }
        return $this->findByCallback(
            function (PharInvocation $candidate) use ($invocation) {
                return $candidate->getBaseName() === $invocation->getBaseName();
            }
        ) === null;
    }