do a search, there was some in depth posts on this about the 1ggte engine just recently....
I am also having the same problem with my 1ggte aswell, get's to 5000rpm fine, but then miss fires just after that once or twice.
I have worked mine out to be either when the lights are on, or when the thermo fan is on, so mine is some kinda electrical thing, haven't looked into it much more yet...