Sometimes $parent->parentNode is null and fails.
Allow custom ChangePasswordForm form

With this modification we can use Object::useCustomClass() to create a
custom ChangePasswordForm form:
Object::useCustomClass('ChangePasswordForm',
'CustomChangePasswordForm');