Reinstate errors for unused variables and imports.

Fixes #3321