Myria profiling fixes

Redo of #239