Electronic-state–lifetime interference in the hard-x-ray regime