Fix bug DNN-4169: rollback 2 changes made for DNN-24075.