attr: store attribute stack in attr_check structure