heaps: fix slurp-heap to allow modifying the heap while slurping.