Fixes #87131 by not iterating the excludedFields array if it's null.