fix off-by-one in XSLT error message parsing