fixed possible exponention explosion of the expansion size of MAX_ENCODED_LENGTH_ macros