public function matchOne($query)
    {
        foreach ($this->loadData(true)->instances as $instance) {
            if ($this->match($instance, $query)) {
                return $instance;
            }
        }

        return null;
    }