Allow doing things like "groups.groupname" in with_nested.

Fixes #3858