Logged In: YES
user_id=695149
Originator: NO

This problem is related to missing valve layer.
Adding this layer should solve the problem.
Please test this solution, if it works for you additional validation for layers should be added to the function.

Regards
Maher