Related: #i125349# moved clip enhancements to base clipping functionality

(cherry picked from commit 7c5e9b9b3c5c899d63bf171ee1c9050db860337e)

Change-Id: I570e92c78196895bef329eb308eeb68ffc5e23d3
Related: #i125349# refined to exclude possible recursive calls

(cherry picked from commit a02eb39b84d130e5923f72edb2abb3b21adf6fff)

Change-Id: Id068928f77a6efed44da9b83ecbf547302826591