registration: Improve error message for non-array attributes