Fix bug in mesh/field code related to difference in handle types