Flow across reefs or between islands, and effects on shelf-sea motions