Extract `register_as_layer()`