Fixes Issue 12658 - Emit informative diagnostic when file with a
platform-incompatible extension is found.