Make scanr a good producer and consumer

This fixes #9355.