pairedEndowmentIndex is never used and if... endowment in pairedEndowments will never run because parentEndowments and pairedEndowments are mutually disjoint.
The pairedEndowments loop uses index, which is the same as it was on the last iteration of the parentEndowments loop, which correlates traits that should not be correlated.
Three separate hashes are created for pairedEndowments, but only one is needed because they all use the same value.
Updated behavior:
Only one hash is created for pairedEndowments
All pairedEndowments use the same value, which is now independent of the last iteration of the parentEndowments loop
Current repo behavior:
pairedEndowmentIndex
is never used andif... endowment in pairedEndowments
will never run becauseparentEndowments
andpairedEndowments
are mutually disjoint.pairedEndowments
loop usesindex
, which is the same as it was on the last iteration of theparentEndowments
loop, which correlates traits that should not be correlated.pairedEndowments
, but only one is needed because they all use the same value.Updated behavior:
pairedEndowments
pairedEndowments
use the same value, which is now independent of the last iteration of theparentEndowments
loop