Should this be:

```php
} elseif ($global && (!$region || ($region && $description->getData('namespace') !== 'S3'))) {
```