Rewrite -concat to avoid a recursive block

Fixes #234.