Heterogeneous dynasties and long-run mobility