trace keys as well

Fixes #3485