Really weird: query not returning expected data after upgrade from 3.5.16 community to 3.5.19 enterprise

screenshot of PROFILE or EXPLAIN with boxes expanded (lower right corner)

PROFILE of the successful query:

PROFILE of the failing query:

which plugins / extensions / procedures do you use

None