Revert "Fixes #1385 functions_modcp - var not an array"

This reverts commit 38d0a22b0f09e1cd36e2a66b3f768a2447fd4451.