ndf: Fix the logic in ndf_hcopy

The output NDF should be left unchnaged if the input NDF has no history
component. This means that any pre-existing history component created by
ndfHcre within the output NDF is left intact if the input NDF has no
history component, enabling default History to be added to the output
NDF when the application closes.