1) Go into the Administration section -> Data formats. Check off "ENABLE IMPERIAL UNIT SYSTEM FOR ENTERING MEASUREMENTS" and save.
2) Create a new patient. Observe that the measurement unit system dropdown is displayed in the measurements section, as it should be.
3) On that same patient record, draw a pedigree. Save it and return to the record. (The content of the pedigree is irrelevant).
4) Scroll back down to the Measurements section and observe that the measurement unit system dropdown is no longer displayed.
The $config velocity global is being reassigned to the incorrect config object. Many other places in the patient sheet depend on this $config object being assigned to the PhenoTips.DBConfigurationClass xobject on the WebHome xdoc and will break if the variable is assigned to something else.
The reassignment happens inside a conditional block that is entered only if the patient has a pedigree, so this behaviour is only triggered when the patient has a pedigree.