Make the rendering hack a little more robust
Adapting based on comments
Merge pull request #293 from geoadmin/dev_search_rendering

Search rendering/compile only once more robust