fix hardcore closure abuse

This actually works because the closure captures `s` from the
enclosing scope (list comprehension).