Fix logic on nested lithe context completion