Well, looks like we had to copy over some more code from staging to live. Then it worked. But the error is not very clear about what the problem is...