Fix parameter count to TicketLock::lookup

This is basically a slight rewrite of @clonemeagain's patch to remove one of the lines of changes