More -Wconversion and dof_id_type fixes