Let's walk though this tomorrow, but it seems like we have at least one extra flag in here. Can you remove isTableMatch (just use isInTable)?