Second attempt at beforesortmapcreate callback, this time with unsorted array