Are you certain that the 'illegal opcode' values are in code, and not data structures or variable values?
I have only (1) function in my projects for 908 / 9S08 controllers that intentionally contains an illegal opcode - I use it to force a CPU reset (and thus a system reset) under software control if things get into an invalid or unrecoverable state. My processor initialization is setup so an illegal opcode exception causes the system reset.
Otherwise I don't know why such would be in the code of the project, unless the disassembler was misinterpreting data for for instructions, or had gotten out of synch with what processor it is connected with.