Fix an NPE when scanning excluded commits.

I'm not clear on why excludedCommits is null (serialization, maybe?) but this works around it.