Doh! It was not stopping because of an error. It was stopping because I set a breakpoint. What confused me was that I set a breakpoint in the end next line ("End If") to inspect the value of "sCaption", but this breakpoint did not break, so I thought the IDE stopped. I did not recognize that it was already at the next "i" in the For-Next loop.
To make it more clear and to reproduce the behaviour, do this:
If i<2 Then
Dim nThisMap As Map
nThisMap = ListOfMaps.Get (i)
sCaption = nThisMap.GetKeyAt(2)
End If
Set 2 breakspoints:
Breakpoint 1 at line "sCaption = nThisMap.GetKeyAt(2)"
Breakpoint 2 at line "End If"
Breakpoint 1 will be hit, but breakpoint 2 will not be hit although the breakpoint is present.