Doctrine provider: memory allocation caused by "entire batch was filtered away"

If there is a big number of objects filtered away while indexing, it causes memory allocation issue due real objects remain inside of Doctrine UoW.