Improve unused variable rule to work for unused parameters