Used another way to get layer name to fix failing test on jenkins.