This bug has been found by OmegaT users and was also present (but now corrected) in standard OmegaT.
In previous DEV release we introduced possibility to define rules for usage of foreign language. This is inspired but different from what OmegaT did since release 5.
When trying to correct previous bug we saw that this feature also had a bug: even segments which are in the project's target language were referred as foreign. Not only it takes lot of memory but it also affects tm/auto, where foreign language entries should not be loaded
Now the foreign language attribute is set only if the target language differs from project's one.
Previous release did not take care of property x-target-lang (simply because it did not exist before and we did not study impact on features like tm/auto), meaning that tm/auto could eventually insert a segment from a foreign language. In 3.5-FINAL and 3.6-BETA, entries with target language are now rejected (now that entries with correct language do not have such attribute).
In 3.7-DEV we apply the same rules as for the editor: the segment is inserted if and only if it would have been inserted in the editor according to the rules.
Two options are added in both versions for foreign language rules: now for each specific language you can also decide
Add new comment