Remove useless variables in get_common_elements().