Astronomers find clues to the origin of energetic cosmic X-ray flashes