Corrected bug in symbol matching

I think there was a bug in your intersection code. This should fix it.