When I first saw it, I think I either figured out that or was at least suspicious that Dietrich was playing both parts but that the film would never reveal for sure. I thought they would end it with us wondering if they were both the same woman but never make it clear.
That would be an interesting ending too