Use original qualities to detect encoding scheme if they are being resto...

...red.