The ribosome stabilises partially folded intermediates of a nascent multi-domain protein