Bridge is acting like a bush tile, how do I fix it?

I made the water passable and it's set as a bush tile, so the player looks like they're partially submerged in water when they're walking in it.
If I put a bridge on the water, the bridge also works as a bush tile, even though it isn't set up like so.
How do I fix that?

Both water and bridge tiles are set to O passability

I don't know if tile passability fix solves that, you should give it a try.
Spoiler: Code inside
Code:
class Game_Map
  alias hrk_layered_tiles_flag_old layered_tiles_flag?
  def layered_tiles_flag?(x, y, bit, water = false)
    l = layered_tiles(x, y).length
    result = layered_tiles(x, y).slice(1, l - 1).any? {|tile_id| tileset.flags[tile_id] & bit != 0 }
    result &&= (tileset.flags[layered_tiles(x, y)[0]] & bit != 0) unless water
    result
  end

  alias hrk_bush_old? bush?
  def bush?(x, y)
    water = hrk_check_passage_no_events(x, y, 0x0400)
    layered_tiles_flag?(x, y, 0x40, water)
  end
 
  def hrk_check_passage_no_events(x, y, bit)
    layered_tiles(x, y).each do |tile_id|
      flag = tileset.flags[tile_id]
      next if flag & 0x10 != 0
      return true  if flag & bit == 0
      return false if flag & bit == bit
    end
    return false
  end
end
I don't know if tile passability fix solves that, you should give it a try.
Where can I find this fix?
In the steam version of RPG Maker VX Ace it should be added by default, as for the script itself I have no idea. However, I checked it on my own and it only interacts with passable tiles, it has nothing to do with bushes. I added a little snippet in my previous post. You can use that to solve your issue.

EDIT: I improved the code a little bit.
I put your snippet under Materials and above Main (should I put it somewhere else?) and I got this error:
Script 'Game_Map' line 363: NoMethodError occurred.
private method `select' called for nil:NilClass
There must be an error with "ship_passable?" as it is the only method that uses an array there. As soon as I can access the engine from my computer I will provide you an updated version of the script. I hardly believe the error is on your side, most likely it is using uninitialized events (which is possible).
Okay, thank you very much.
I modified the code above so that it no longer throws that error when there are events in the map.
I figured out a workaround. If my game was more complex, I'd try a more "proffesional" approach to this issue.

I made a copy of the tileset and changed the water tiles there, so they are no longer considered bushes.
I marked the bridge with region tiles and created a common event. It checks if the player is standing on the bridge, and changes the tileset accordingly.
If they are on the bridge, water is not a bush-tile. (copy of the tileset)
If they aren't on the bridge, water is a bush tile. (original tileset)
This common event is active only on this particular map.

I won't be using your script, but I'm still very grateful for your effort.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/bridge-is-acting-like-a-bush-tile-how-do-i-fix-it.109852/