dot expr: fix scoping for data logger

fixes #899
fixes #895