Avoid leaking keys from local array