NYNYCCHKBK-4026. Fixing issue with dataset loops.