Fix for non existent relations
Bugfix, updated tests and fixed some formatting errors
Merge branch 'ferrydg-non-existent-relations-fix' into develop