Well, try the swimlane layout algorithm after creating your groups. This algorithm respects columns and rows of top-level table/swimlane nodes. Moreover, it will usually not place nodes into groups that do not belong to those groups.
However, this is not always possible:
The two yellow nodes belong to the group, the red node does not. But due to the cell assignments of the yellow and red nodes there is just no way to prevent the group from covering the red node. (Cell assignment is more important than group assignment.)
Only the swimlane algorithm behaves this way - all other layout algorithms ignore cell assignments and thus will not place nodes into groups that do not belong to those groups: