Skip inspection if the function declaration is inside a type declaration (fixes #437)

This fixes the inspection for unused parameters when the function is inside a type declaration.