Merge branch 'lockref' (locked reference counts)