Use legacy attribute getters in interfaces.

Fixes #6041