Merge branch 'tg/stash-ref-by-index-fix'