Fix issues with unassigned readonly fields and a weird conditional check.