Improve detection of keyword arguments