bug #21: incorrect closure ID detection in code gen.