stream: set elements to NULL before removing