(cherry picked from commit 78bb17dd22e4da4e3810fbc78185d73bb25ea73e) Signed-off-by: Domen Kožar <domen@dev.si>
[Squashed commits to make git blame etc. more likely to work. -ED]