Properly handle namespaces during parameter caching (fixes #351)