Remove unused function trans_external_path_casted