Fixes for the IR builder refactoring

- Re-adds sharing support to new runtime pickler
- Smaller fixes here and there