fix(engine): RuntimeService.getActivityInstance from nested command

make sure that RuntimeService.getActivityInstance() takes into account
current DbSqlSession cache.

Fixes Stack overflow in case sql session cache and db state differ
structurally.

related #CAM-2169