Fix invalid auto-correction for unused keyword arguments

This fixes #1177.