More robust handling of NEXUS files.