SONAR-4515 Moved check to another place to not break views