Iterating free-field AdS/CFT: higher spin partition function relations