When done correctly, all the goblins will be be released by the time all but the last two rattlesnakes have been released.
×Read the scroll again. It gives a 5-length word that contains 4 words of length 2, each different. It then challenges you to do the same with 3 length words.
Click here to view the secret text
×That means you need to make all 8 3-length words possible, within a 10-length word. When all but two of the rattlesnakes have been released, you must have already freed all the goblins, because two rattlesnakes are not enough to make another 3-length word.
EDIT: While I realise that there is a 'default' value for a non-existant rattlesnake that can be used, it's not part of the intended solution, and not something you need to use. Solving it in the intended manner is much more straightforward.