Refs #6385 only set variable if using nx