Parent cache invalidation fix
There are some cache invalidation issues that affect both the parent entity and dependencies in different situations. End result is that the cache is not invalidated properly. This should provide a fix for those situations.