fix RedeclareInspection block bugs
Merge pull request #901 from bronze1man/pr-redeclare

fix RedeclareInspection block bugs