GEOT-4229 fix join of more than two tables

Signed-off-by: r0bb3n <r0bb3n@gmx.de>
Fixes mismatch while retrieving attributes from joins with more than two tables.