It seems like the function whitelist_staff_user_custom_field does not play well with multisite.
If the staff notes plugin is not enabled in the multisite master as well, then (in this specific case) the staff_notes_count custom field is not whitelisted. A workaround is to add that field to the to the staff user custom fields site setting.
Other functions in instance.rb face similar issues when calling plugin.enabled?