Fixed the JS error displayed by IE8/9 on Species page load.
References #18979
Fixed the exceptions thrown on Habitat reference search.
References #18979