fix wrong comparison when parsing list parameters

Fixes #1906