Fix getAttributeCount() on unfinished/reopened schemas