Hierarchical theories for a linearised stability analysis of thin-walled beams with open and closed cross-section