Disallow unknown custom indexing parameters

Fixes #2354