fixed legend source
added hack to clear legend cache after context switch
Merge branch 'master' into legendSource-116
fixed layer order
Merge branch 'legendSource-116' into staging