Bug fix: exists() creates elements/properties (Issue #591)