Hi,
Is the Firewall the gateway for all 3 vlans? If you to test this, you can use only one of the 3 links from the switch to the firewall and trunk the interface on the switch with all vlans (1, 2 and 5) and create sub-interfaces on the firewall (if possible) and put each vlan IP on a Sub-interface. This way you don't have multiple links from the switch to the firewall (you only have 1) and this eliminate the possibility of any loop.
HTH