Revert "build: get rid of the sparse expand stuff"

This reverts commit 0550bea361f820f755a4ce632384abdbe5d51b17.