The first part of this function is  essentially a copy of `complete_source_space_info`, no?