Valve spring is a very good possibility. Haven't seen that issue on the 6.4, but the 5.7's are a regular in our shop. Runs very rough, if it runs at all. It's amazing what a broken valve spring will cause the electronics to default to. Not just a simple fix anymore. You have to think it through. If it's a plastic intake manifold, suspect a vacuum line that fell off, crack, glued in plug that fell out. Is the idle speed higher than normal? If it is, I would suspect an intake issue. If not, I would be looking at valve springs, bent pushrods, etc...