Reg test

New regression test checking a number of policies, rolling a bunch of keys. Last minute 'fix' to make test deterministic. There is some kind of weird bug when enforce task is the root node of the rbtree it can not be found. Reason still unknown.