Fix some errors found by checkbuild.

Refs #9970.