Assorted fixes for resource system
This is purely technical MR to not forget to merge changes that are dependent on MR !649 (merged)
Edited by Dmitry Kazakov
This is purely technical MR to not forget to merge changes that are dependent on MR !649 (merged)