Fix bug using incorrect mod in semi-Lagrangian scheme.