Fix an error with unbound 'note' variable in 'dh'