Typo in attribute access.

Addresses #4967.