Code fixes and cleanup for the standalone reproducible example (for debugging saving and restoring objects with attributes).