fix hasattr lines added in PR3519

hasattr(blah,"a.b.e.d.c") is not valid python syntax for checking if blah.a.b.e.d has attribute c. Fixing though I'm not sure the cascade of hasattr checks in this case is needed… HO in 2015 configuration broken without this fix - thanks to Salavat for noticing the problem.