Move `expand` out of `build`.