Make object, type and variable names case-sensitive.

Fixes #5228