Hoppers insert into a normal chest adjacent to the trapped chest they're supposed to insert into.
If you have a hopper inserting into a trapped chest with a normal chest to the North or West of the trapped one, the hopper will instead insert into the normal chest. It doesn't matter what direction the hopper is inserting from.