So to start off, this isn't a Celica, rather a TS Corolla with a 2zz-ge, but I assume it shouldn't be too much of a difference.
So a couple of months ago I bought this car with a check engine light, giving an oil control valve fault code, thus limiting the engine to around 7000 rpm and not activating the lift system. After reading through some stuff about these engines I found out that snapped bolts are often a cause of something like this, so I took the head off and low and behold one of the bolts was missing (I believe on the exhaust side). I thought it was snapped until I noticed that not a single bit of it is in there, I looked around the whole valve train when low and behold, I found it just laying down in the corner. I am not sure how it didn't screw the whole engine up, but I guess the previous owner got lucky. I got the bolt back in there with some threadlocker and thought everything will be fixed. However after clearing all the faults it would still give me the check engine light whenever I reached 6200 rpm. I planned to take it to a proper mechanic for a check, but miraculously after an oil change and a couple hundred kilometers the lift started working as it should. However, after a month or two of driving it started acting weird again, sometimes working and sometimes not. And here is where I am lost, what should I do? My first assumption was the oil control valve filter. It was pretty clogged up, but I cleaned it before re-assembling the engine. Could it be that or something else?
Sorry for the long read and sorry if this isn't the place to ask such things, completely new here.