Spatial averaging over a variable volume and its implications for simulation of open channel flows over permeable beds