OK. I still can’t put my finger on what the problem was but it seems it had something to do with the name of the lateral weir, which didn’t actually exist in the model – it must have been a hangover from an earlier version.
The fix? Delete the lateral weir from the geometry, then replace it.