Issue #3158 was closed, but only half of it was done. We still need a `layer_sf()` constructor that can be used by 3rd parties to create sf layers.