Set correct parent block when processing children