diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h
index d3dc8bae47..d2aae0c337 100644
--- a/src/include/tsearch/ts_utils.h
+++ b/src/include/tsearch/ts_utils.h
@@ -81,8 +81,10 @@ extern void pushOperator(TSQueryParserState state, int8 oper, int16 distance);
  */
 typedef struct
 {
+	uint16		flags;			/* currently, only TSL_PREFIX */
 	uint16		len;
 	uint16		nvariant;
+	uint16		alen;
 	union
 	{
 		uint16		pos;
@@ -90,13 +92,11 @@ typedef struct
 		/*
 		 * When apos array is used, apos[0] is the number of elements in the
 		 * array (excluding apos[0]), and alen is the allocated size of the
-		 * array.
+		 * array.  We do not allow more than MAXNUMPOS array elements.
 		 */
 		uint16	   *apos;
 	}			pos;
-	uint16		flags;			/* currently, only TSL_PREFIX */
 	char	   *word;
-	uint32		alen;
 } ParsedWord;
 
 typedef struct
