fixes #480, magic wrapper behaves in a more predictable way in certain edge cases
refactor magic wrapper
Merge pull request #500 from RactiveJS/gh-480

fix for #480