Fixing occasional thumbnail reading, as well as bad logic in the demosaic selection.