Fix hang on medium-sized graph import