I'm glad you brought this up, I too have had this issue and automatically adjust for the allowance of one train in followed by one out before allowing the next to enter a depot/bldg.
It is and at the same time is not a bug.
The section of track attached to each building is part of the building so if your 2nd train is outside this and on a piece of track which you can move/demolish it counts the way as clear and allows the next train to exit.
Depending on the angle of the building placement this section of 'attached' track can vary in length and therefore the time of clearance for a train to enter or leave also varys, hence it can seem like a bug.
http://img185.imageshack.us/img185/3360/33609565.png
The above link shows how the sawmill has a longer 'attached' track than the passanger station, hopefully this makes things understood a little more
















Ok, so here some truble I experienced:
- sometimes when I reverse a train using a wrong positioned switch, the locomotive gets separated from the wagons and "jumps" on another track (happens when the train is on a another switch).
- normally, when a train is entering a station and a another train is going to leave from it, it waits and the blinking lights are on. I had two trains running into the "town" station the one very close behind the other and while the first was entering town, the lights went on, signalling, that there will be a train leaving the "town". The second train was also already in the "town", yet the outgoing did not wait and started right after the first vanished. Is the waiting mechanism programmed only for one incoming train?
I know, that these problems might be hard to imagine by my words, so I try to get some PrintScreens and post a link here.