Fixed values 'captured' by redirected 'print' and not collected (fixes #240).