test: ensure HEAD is not modified unexpectedly