Fixing index out of bounds issue when adding new sub attributes during
inline editing.