fix RedeclareInspection block bugs

All tests passed.