I found another workaround. Edit xterm's util.c and change line 2161: unsigned int h = (unsigned) (nlines * FontHeight(screen)); to: unsigned int h = (unsigned) (1000); i.e. increasing the h variable to a large enough number makes it work for some reason.