Must segments of a way be contiguous

In JSOM you can create a way from segments which are not adjacent to each other. Is this correct to do so?
Why I am asking:
When creating highways or waterways there often are short way elements (most of the time only a single segment long) which require special tags. (layer=-1 or bridge=yes …)
May the two parts of the way before and after this short segment belong to the same way element (normally they need the same tags) and only the segment in between gets its own way element with the special tags. Or must there be two distinct ways before and after? (This would mean that whenever a way crosses another way above or below, this way has to be split in 3 ways.)

Another question I have is if it is OK to asign a “layer=-1” tag on a small river over a longer distance, because it crosses under several streets.

Ways should be continuous. This means there shouldn’t be ‘holes’ (segments missing) and ways also shouldn’t be forked.

Here are some more mapping conventions.

About the other question: yes, defining a small river as layer=-1 is OK (when all crossing ways are properly layered as well), however there is a preference for having the surface of the earth tagged as layer=0 (layer=0 is default so you don’t need to add that to every way).