Improve tracking of original path values
Protect from object prototype modifications

Fixes #534