I had in mind more that perhaps, just perhaps, Iran dispatched a planner to Hamas last year and that imbedded planner worked without further contact with Iran. Just tossing out a possibiity that does not seem far fetched to me.
The interesting security lapse question is how Hamas knew so much about the layouts inside the listening posts they attacked and easily eliminated and other knowledge of Israel's systems they seemed to have.