Fix logic: from tag and by attribute are orthogonal