tcx: move initialisation from realizefn to initfn