Call set("disabled") and set("readOnly") in startup so children are updated appropriately. Added test cases. Fixes #17399.

(cherry picked from commit 4f2b949cfcf45f59628484f704b04989d5586fde)