Added `deep sorting` for dealing with variable shape `Objects`, fixes #2