PHP: fixed crash when resolving nested expressions