mmmhhh... referencing the table that owns the triggers in a before trigger?that's bad -very bad mojo.

Your trigger is looking for troubles, specifically "mutating table" troubles.

Research "mutating table and triggers"