Added checks for pose number consistency.