This only applies to the things that are known about by the person creating the work. If a movie is made, but they do not go and see the movie, and then they write a book that has the same story as the movie, that is not a derivative work.