Fixed bug in persistent shader code.

Thanks to tests, fixed a bug that didn't correctly translate shader list
types.