Replacing a custom diagnostic with a more standard one. No functional change intended.