Fixed handling 'trap-error' primitive.