BS-6761
Fix validation algorithm to go deep in groups