Checking for AppSynching would be dangerous as that means that your constraints are not properly rebuilt as part of the synchronization process. Constraints are deliberately rebuilt during the synchronization when a request comes in to make sure the proper constraints are active. You could check pbInitWebApp (one of the private properties checked by AppSynching) to only skip operations when the webapp is loading.