Code looks much better now, thanks. Still I believe it could be improved.
I don't think that using srand() / rand() in signValue procedure the way you did is such a good idea. You create a side affect (changing current randseed) which could cause problems in some cases. And there is no real need for that. For instance you could use following formula instead:
hash(attno || hashVal || j)
I've discussed this with Teodor privately. Extra hash calculation could cause performance regression. He proposed to use own random generator instead. Implemented in attached version of patch.