If numberfilms is 2, there was 1 film, and the second film (which is in films[1]), is the added film. You can't ask for films[2], because there is nothing in there.
film [1] is the added film, so you should only check if the film is equal to the previous films. If you check if the film is equal to itsself, it will always return true.