Rewrite bug-visibility to handle dependent fields correctly in all cases.

Example of incorrect behaviour possible in old version:
1) Field A has value_field=C
2) Field B has value_field=D and null_field=C
3) Suppose field A gets initialised first. It triggers initialisation of C,
   C alters values of A and nullability of B. Then B gets initialised, and
   triggers initialisation of D, which alters values of B and overwrites
   its nullability previously altered by A.