Add basic support for non-destructive nested rendering.
Recursively update element references during rendering.