Spanning tree issue

Issue
Spanning tree issue. A single dumb switch plugged into 2 ports on a single Peplink switch.
It got two IPs using the same mac (1 for each port).
It was causing DHCP to be duplicated for devices attached.

Resolution
We unplugged the second connection port and it cleared up the issue.

Question
I thought Peplink had spanning tree protection, does something else need to be enabled to stop something like this from happening in the future?