// Add a new fragment if this group is not nested and either there are
// no fragments or the last one caused fragmentation.
final FormFragmentData current = getCurrentFormFragment();
if (groups.size() == 0 &&
(current == null || current.causesFragmentation())) {
addNextFormFragment(group);
} else if (!current.causesFragmentation()) {
// Update the current form fragment to have the correct styles.
updateCurrentFormFragment(group);
}