Frontpage check with enabled language filter

Extended code which would work also when Joomla Language Filter plugin is enabled. 
Also when your home page is type of Joomla Category Blog then when you go to article from this page then it should not be detected as home page - check query view.