Legislators tangle over bill that would require police to investigate immigration status