I don't know if this is really a bug or the game is designed that way, but apparently barrels block your LoF. That seems to be very confusing due to the fact that concrete wall blocks are for some reason NOT blocking LoF and enemies are able to shoot you over those.
E.g. look at the screenshot below