locigal delete: use deleted flag in queries