What I ended up doing was separating out the scripts into two bundles rather than having a bundle shared between the steps.
Eventually the bundles will contain separate scripts so this makes more sense in the long run anyway.
I then added a step for each bundle in the Octopus Deploy project.
Ideally this would be in two projects however I'm only using the trial version at the moment.