Fixes infinite loop issues when recursing into Backbone objects with event bindings

This is a pretty simple pull request that solves the issue of an infinite loop occurring with nested backbone objects with event bindings.

The solution is quite simple: check if the property is a backbone object when flattening and if it is, just take the object rather than looping through its attributes.