More dof_id_type fixes

This batch fixed a runtime error with 2 byte dof_id_type.  Which
nobody would ever want to configure with, of course, *except* that
the exposed error would also have affected 8 byte dof_id_type but
would have been much harder to trigger.