test cases for #166: select after paste freaks out

let's make sure that particularly freaky, "LaTeX omelette" bug doesn't
happen again