Refactor Constant#each_matching_filename_in for complexity