Fix issue #12000

Trim key property