On the use of guards for logics with data