Make lr closure and transition functions less clever
reduce usage of comparisons with 'undefined' for sets