Fix support for new attribute access API in upcoming 2.0