Fix allOfs to use $refs.