As it turns out this only occurs with a OWLIM3 (beta7 and beta11 tested) SAIL.
The issue appears to be inside org.openrdf.query.algebra.evaluation.iterator.FilterIterator.accept(BindingSet bindings) method where only the scopeBindingNames are retained for the condition check. In our case the scope binding names are the variable names from the triple pattern (X,Y,Z) and yyy1 is thus ignored.
IMO this is a bug, because scope variable bindings might come not only from triple pattern search but externally as well (e.g. setBindings()).
I have just verified this issue. The memory and native store are not affected by this bug because they 'inline' the externally supplied bindings as part of their query optimization process. They actually supply and empty binding set to the query evaluation after that.
This inlining optimization, however, looks like the only solution to properly evaluation a query model in a depth-first fashion. After fixing this issue I have tried to verify the fix by disabling the inlining optimization and supplying the bindings directly to the evaluation engine. The query produced the correct number of results after applying the fix, but it also included the external bindings as part of the query solution.
I don't see an easy solution for this in the query engine. It's probably a lot easier to apply the inlining optimizer in Owlim as well(?).
This appears to be fixed in SwiftOWLIM 3.3 SAIL (I have not tested it with BigOWLIM)