Prevented access to an undefined comm object in __generate_grid_from_string.