BMW recalled most 318iS' to change the inner profile gasket when th problem arose afaik.
If your engine is still going after 15-17 years you should be safe that it has been replaced.
On the timing chain though...
Whatever you do, don't skimp on it by only replacing th chain.
If your opening the engine at all, do it properly by replacing the lot saving time on doing it again and at least you'll be guaranteed it'll be good for another 100K+ miles