Entropy/selfmod: fix test for number. fix behaviour for defgen.

- in defgen, selfmod should replace a root element of the defgen
  call. with pos 0 it now does just that.
- add test for above behaviour and for a value of nil
- the rounding of floats is not performed on integers any longer