Merge pull request #3667 from RisingFog/fix_savestates Fix savestates if a device is changed after a savestate is made