more tests for expand-hash, fixes