AutomationPattern: fix a bug I accidentally introduced in length()