I am puzzled by a pattern I am seeing in submitting nested SELECT statements to the WDQS. 
In cases where a federated query to the WDQS time out, it helps to include redundant SELECT statements for the same query to resolve. 

The following query does not resolve:
Inline image 1
source: https://gist.github.com/andrawaag/ba1b7d1b9adf06e9d45afa98c1d1e239 
results: http://tinyurl.com/ybl55tk4

When the lines 7 and 9 in the above example are duplicated, suddenly the query does resolve
Inline image 2
source: https://gist.github.com/andrawaag/7e2e793342011f66bb6a3ea7bb5a1326
results: http://tinyurl.com/y9mjkejo


What is the added value of a double SELECT (line 7,8 and line 10,11). Also the lines 5 and 9 had to be separated by a SELECT statement to be successful.

Is this an implementation issue, or am I doing something wrong?

kind regards,

Andra Waagmeester