Given this test dataset:

```
GRAPH <urn:graph:X> {
<urn:resource:subject> <urn:resource:predicate> <urn:resource:objectX> .
}
GRAPH <urn:graph:Y> {
<urn:resource:subject> <urn:resource:predicate> <urn:resource:objectY> .
}
```

The following queries:

```
SELECT DISTINCT ?g
FROM NAMED <urn:graph:X>
FROM NAMED <urn:graph:Y>
{
BIND (<urn:graph:X> as ?g )
GRAPH ?g {
?s ?p ?o
}
}
ORDER BY ?g
```

```
SELECT DISTINCT ?g
FROM NAMED <urn:graph:X>
FROM NAMED <urn:graph:Y>
{
GRAPH ?g {
?s ?p ?o
FILTER (?g = <urn:graph:X>)
}
}
ORDER BY ?g
```

return the expected result:

```
g
urn:graph:X
```

This query, however, does not:

```
SELECT DISTINCT ?g
FROM NAMED <urn:graph:X>
FROM NAMED <urn:graph:Y>
{
GRAPH ?g {
?s ?p ?o
VALUES (?g) {(<urn:graph:X>)}
}
}
ORDER BY ?g
```

as both graphs are returned:

```
g
urn:graph:X
urn:graph:Y
```

The problem was reproduced with Stardog 5.3.6 and Stardog 6.0.1