jefft,
As far as I know, the engine number matches the frame (VIN) from the factory for Yamaha bikes. I have been stopped a couple of times by SC's finest and the first thing they check is if the engine number matches the VIN. If it doesn't, then you are supposed to have a separate bill of sale for the engine, so I would think that would be a requirement in most states, that you have a bill of sale for the engine as well as the frame.
Now, having said all of the above, I think that the Japanese manufacturers did not always match the numbers leaving the factory, so it might be a good idea to always get a bill of sale for the engine when you buy a motorcycle.