Added support for setting attribute defaults given a string instead of an index.