`stream_resolve_include_path()` simply resolves to first found file using the configured `include_path`. If no relative path will be given this will be used without `include_path`. It doesn't check the type (see `stream_resolve_include_path('/tmp')`) or readability  (see `stream_resolve_include_path('/root')`)

So please use `$fromIncludePath`:
```php
if (!$fromIncludePath || !is_file($fromIncludePath) || !is_readable($fromIncludePath)) {
         throw new Exception\InvalidArgumentException(sprintf(
             'Could not find or open file %s for reading',
             $filename
         )); 
}
$messages = include $fromIncludePath;
```