I'm having a really weird issue with one of my arcade field calculation in Pro. I've been using this to calculate IDs for my features, and it's been working until I updated to 3.4 recently.
We have IDs that are a concatenation of the asset type abbreviation and an incremental integer with leading 0s, so my expression finds the current highest ID number, adds 1 to it, and returns the concatenated value with 0 padding applied.
Now, however, when I grab the highest current integer, it is giving me a NaN. Added some console statements to my expression to try and figure out what was going wrong:

So, my list of values contains the integers, and they are properly typed as Number, until I use the First() function, at which point the value is preserved but the type changes to "Unrecognized Type", which then becomes NaN when I try to increment it.
The exact same expression results in the correct ID being generated when I try it in the Arcade Playground if I load my data up as a FeatureSet from json:

Any suggestion how I can resolve this and get my calculation working again?