I just spent waaaaaay too long figuring this out, so I'll leave a note of it for future projects:
To enumerate the current node's position in the current nodeset, position() is great. However when using nested nodesets, getting the parent's position relative to its nodeset is a bit more complex:
count(parent::*/preceding-sibling::*) + 1 - assuming all nodes in the parent nodeset are of the same type, otherwise:
count(parent::*/preceding-sibling::<type>) + 1 where <type> is the type of the parent node
A quick beakdown: