Fixed issue #257. The function commonFuncHead assumed that the first term was a function and failed when that assumption was wrong.

git-svn-id: http://gapt.googlecode.com/svn/trunk/source@1825 85d21ef8-add0-11de-ae77-5bfb9c5a3f34