Prevent use of unsupported operation iterator remove().

Signed-off-by: Robert Xu <robxu9@gmail.com>