Script filtering by nested object size problem

This seems to be a bug. When using script filter

doc.containsKey('LAST_MESSAGE_DATE')

(where LAST_MESSAGE_DATE type is long) query returns documents, but if I replace it with MEMBERS (which is nested field) result is empty