Merge branch 'jc/for-each-ref-with-lt-refs' into jc/ref-locking