[TASK] Fix for the MultipleConnectionsInQueryException exception

When using ed_scale extension with pages_language_overlay and
sys_language tables being separated an extension is being thrown.
This fix detect this exception and uses a round a way with 2 queries.

This is change is also compatible with all projects where ed_scale is
not installed.

Related: #1070
Releases: master