Fix false-positive safety check on nested data

Nested tags with well-known names (e.g. "custom.id") would get hit by
the safety check that prevents directly modifying vanilla tags.

This also adds a test case for the specific issue.