Behind the maneuvering over immigration, both political parties looking for advantage