Retrieve kwargs.keys() just once.