BUG-1485: convert BuilderTemplate to use LengthGenerator