The helicity constraint in turbulent dynamos with shear