When REFERENCES_RELATION is set to YES, function can "inherit" references from subsequent undocumented function.

The test case reproduces the bug in Doxygen 1.8.11.

Expected behaviour:
  get_int() function documentation should include:
  References ARRAY_ELEMENTS, E_ONE, E_TWO, iOne, iTwo.

Actual behaviour:
  get_int() function documentation includes:
  References ARRAY_ELEMENTS, E_ONE, E_TWO, iOne, iTwo, iUndocumentedFour, iUndocumentedOne, iUndocumentedThree, iUndocumentedTwo, and UndocumentedStruct::one.