Fix FileEngine not clearing keys when groups are used.

Fixes #3930