Add dependency chain to error message

I've adapted the error message so that it's easier to track down a cyclic dependency issue.