Problem with segmentation

Through the Live API, I am trying to get data on a visitor who had either a) visitorId set to X during a visit, or b) custom variable visitorId with page scope set to X (I set it at log in). So, I try the following segment:


From what I understand of the documentation, the segment should be:

visitorId==X OR customVariablePageName1==visitorId AND customVariablePageValue1==X
which should be equal to:
(visitorId==X) OR (customVariablePageName1==visitorId AND customVariablePageValue1==X)

However, if in the DB I have something with visitorId==X but nothing with customVariablePageName1==visitorId AND customVariablePageValue1==X - the results are empty.
What am I missing?