Handle nested overrides properly

Fixes #107