diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 05c6628b3f58faedabff46c116d4a1e51e8aefc0..04b3892d23fc2d296d6f8007241ba29a347b944f 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -854,6 +854,11 @@ void jtag_add_pathmove(int num_states, enum tap_state *path)
 
 	for (i=0; i<num_states; i++)
 	{
+		if (path[i] == TAP_TLR)
+		{
+			LOG_ERROR("BUG: TAP_TLR is not a valid state for pathmove sequences");
+			exit(-1);
+		}
 		if ((tap_transitions[cur_state].low != path[i])&&
 				(tap_transitions[cur_state].high != path[i]))
 		{