Leica LIF: fix support for new files with 0 padding

Fixes #12144
Merge pull request #1399 from melissalinkert/rebased/dev_5_0/new-leica-lif

Leica LIF: fix support for new files with 0 padding (rebased onto dev_5_0)