CloudnameLock bug fix

Previously did not work if the name of a lock started with the same string as another lock.