I was wondering if you could add a special case that expands rail tile collision boxes to compensate - since you don't "run into" them anyway I don't see this causing any major issues unless you expand far enough into neighboring tiles to prevent building things ADJACENT to rail tiles (signals for example).
But it's not a huge deal, I even got a bit of a laugh when my train proceeded to phase right through the tree ;p I just figured I should mention it since I didn't see any other threads about it.