I'm trying to clean a taxonomy term name in my view and trying to use a function from ctools - ctools_cleanstring(). However, every time I use this (and the module is installed and enabled!) I get a modal window reporting the following:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/blog_categories/preview/default/ajax
StatusText: OK
ResponseText: Events
( ! ) Fatal error: Call to undefined function ctools_cleanstring() in /Volumes/Mac HD/Users/alastair/clients/cotswoldfurniture.com.au/htdocs/sites/cotswoldfurniture.com.au/modules/contrib/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function on line 2

I think I understand why this is occurring - I'm guessing the Ctools module is being loaded after Views PHP and so it's unable to execute that code. Is there a way round this?