Improve wrap-in-block function.