[BZ-1153852] fix incremental compilation when using a drl with functions

(cherry picked from commit d905672bf19725aa12e6bd2a6501e39d410dadb2)