Fixing search so it is not loaded if it is disabled, #525.