pass_gen.pl: Fix a bug in the try/catch for LM encodings.