Avoid accidental call to object.clear

This is not an ideal solution, but it's better than not doing anything. Once object.clear is completely disposed of we can revert this change.

Other possibilities:
1) use a template constraint. Gives a terrible error message.
2) use a runtime assert: it's *much* better to complain at compile-time.