Yup, we do blame ourselves for the incursion as well, but in Afghanistan-Pakistan scenario, the whole idea was to keep the border open, since there were families and tribes split across it and as such they should be allowed to move. Problem arises when drugs/guns and jihadis started pouring in.
That's not the case in India v China. After India got it's *** whooped in 1962, you were supposed to keep the border armed and closed for fear of Chinese incursions, just like in 1962, when Muhammad Daud Khan of Afghanistan sent his forces into Pakistan. The Afghan infiltrators were defeated badly, and Pakistan did close the border, but in lieu of great Pashtun population and trade (since Afghanistan gets most of it's stuff from or through Pakistan) as well as brotherhood, the border was never fully sealed. But in recent times, you can see every attempt by Afghan army/terrorists has been repulsed even if it meant going inside their territory.
Hope that helps.
So lets not drag Afghanistan and Pakistan where it's not needed.