revert 2ad1070/#2297 due to errors, until we figure out the right solution; see also #2310