He Jelmer,
I seem to miss you on IRC these days, so I'll try here. When you have a moment...
I've got this ORM query: http://scrp.at/Xe.
This is the internal structure generated: http://scrp.at/Yb.
As you'll see in the query generated (http://scrp.at/Yc), the last OR is moved to the beginning of the query, and joined with the other conditions using AND, causing this query not to return any results.
What I don't get about your query is why "and_where_open" and "and_where_close" are added twice, that's probably the reason why the last OR becomes an AND (you have both and_where_open and or_where, the first one wins).
I'll try this myself later today.