Fix logic for determining if a context is trivial to account for multiple children