Detect a Drupal 8 site without composer.json for issue #1975220

Stray mention of composer.json here. Can logic be simplified?