In #3758 and #4312, some issues were resolved because of bogus behaviour of regfun3() when called by wall friction models in the special case of horizontal pipe. This gave rise to some singularities that led to bad numerical behaviour.
Hopefully this was fixed by PRs #4157 and #4522. However, as suggested by @sielemann in in #3758, we should probably fix Modelica.Fluid.Pipes.BaseClasses.FlowModels.PartialGenericPipeFlow so that it completely skips the part that accounts for static head if max(abs(dheights)) < eps, i.e., the pipe is horizontal.