On the Generalization of Handwritten Text Recognition Models