Fixes #1928. Disallow sync loop only for certain types of calls but not for exec_[php|shell]. Also fix CARP loop detection to use correct variable