Thanks, Ryan.
Yeah, I think that’s right. I can’t figure out how to change my code to get around the issue though - I can’t move where the function is defined, and I’m not sure what other changes I can make to my code. If you do have any ideas, I’d be very grateful to hear them!