Not sure anymore why in certain cases we would want to omit reference lists. The way the mobile-html output looks like is that we always show the section heading but leave a placeholder where the reference lists should go. This undoes most of T184327.
- https://de.wikipedia.org/api/rest_v1/page/references/Der_Blaue_Reiter (most German wiki articles don't have reference lists since there tends to be some extra text in the same section after the reflist. (See also https://de.wikipedia.org/api/rest_v1/page/html/Der_Blaue_Reiter)
- https://test.wikipedia.org/api/rest_v1/page/references/ReferencesWithExtraTextInSection has currently no reference_lists. (See also https://test.wikipedia.org/api/rest_v1/page/html/ReferencesWithExtraTextInSection.)