mask mode: fix redundant key generation after exhausting all placeholders when using min-length