Fix crash in Viewer

Clicking on a DynamicObject without a position property causes an exception.
This is a regression introduced in the Viewer refactor.