Use transaction id instead of flags for checking