How to fix the "Cannot output multiple independently repeated fields at the same time" error?