[iwhd] maint: simplify the attribute-handling code