Updated handling of diagnostics=true argument to Stan()