Fix compile errors and warnings from changeset 29052.