[4.2] Fixed "relationsToArray"

Not unsetting the relations variable might lead to setting the next key with the previous value if the current value is not an instanceof the ArrayableInterface or null.
2 blank lines after test methods please.