I made stupid mistakes when using references together with foreach. This fixes it.
Merge branch 'dev' into refactor_getPBTerm

Conflicts:
	src/rdb/queries/control.php