Improve relation detection for File Reference

Change-Id: I9859c01ac7b58e62c47a62ad414a1bf95758154a