Make getdotattr always return a flat list