Code rework to address detection issues


git-svn-id: https://svn.ntop.org/svn/ntop/trunk/nDPI@7721 a02cd0c1-8e76-42e1-a119-56f9641475e2