While testing the following snippet of code with the puppet 4 parser it would fail unexpectedly on only a few nodes.
Upon further research, I figured the issue was because of the comparison of two strings not working the same was as two integers would.
So, changing over to numeric for the comparison resolves the issue.
It turns out the issue with the original code only shows up with the values '7', '8', and '9' because the comparison compares lexiographically and makes a decision on the first two values since '7', '8' and '9' are > '6' (the first character in '60').
At the end of the day it seems that fqdn_rand should just return a numeric as it will always be a number and is only a string for historical reasons.