Prevent bad dataset names. Closes #610.