Modified the code generated for consistency checks to use the new generated API.