Teach prepare_attr_stack() to figure out dirlen itself