Flooding and drying in discontinuous Galerkin discretizations of shallow water equations