Wraps the bookkeeping in an anonymous function scope to prevent
the return prisoners[i] cheat.

Signed-off-by: Cyde Weys <cydeweys@gmail.com>