SI-7221 rewrites pollForWork non-recursively

Fixes #1001407