Turns out we didn't need to change our code at all. It was someone elses code that was broken. All better now.