I found that sometimes the advanced settings for child ordinality are not correctly saved and retrieved. The reason is that the variable name stored by the form can be longer than the 48 allowed characters of the variables table, since it is formed by:

"relativity_child_ord_" + parent type name + child type name