Fixed stack trace caused by refetching graph inside rebuildGraph().