(by Yuri Robbers): There are two solutions to this problem. The first solution is perhaps a little bit silly, and it only works if the cake is vertically symmetrical. In that case it would be possible to halve the cake horizontally. The top half and the bottom half would then be identical.
A less silly solution is to cut along the line that runs through the center of the original cake, and through the center of the piece that is missing. If the centers happen to coincide, then any line through that joint center will do. Any rectangle is halved by any line through its center. Cutting through the center of the cake therefore halves the cake, while cutting through the center of the missing piece, halves the missing piece.