Document block argument for .by and fix related bug.

Was not correctly passing the needle to the block argument when it could
not be found.