Move the autodetected flag back to #autodetect since it is its concern and not #autodetect_orm's
Remove unneeded 'nil' branch from #autodetect_orm