Stefan, thank you very much for your quick answer. This was an obvious silly mistake. Now the first function does what it should. Still, me and my colleagues can't make any sense of what happens in the second example. The re-transformed function is identical to the original one, but the Fourier-transform doesn't have anything to do with what it should be mathematically.
Could you or someone else please have a look at it?