find the index of a buffer in a buffer