The evolution of complexity and robustness in small populations