The generated query contains a sub select on the table of the sequences type, resulting in a transparent loss of the contraint. Queries such as this one should instead generate a WHERE IN clause or result in an immediate error.
For types using multi-part IDs this logic will not be supported just like it is not supported when using multi-part IDs in a CONTAINS operation.
At this time, it is not supported to use entities with CONTAINS operations. Instead, the IDs must be passed into the query. This constraint will also apply to the ANY operation.
This also affects ALL and other result operators.
TODO: Update linked Wiki-page when issue is fixed.