The attached file illustrates the bug: If we have a branch inset, then it seems always to be followed by a \selectlanguage command, followed then by a newline. This inserts unwanted space on export to PDF.
The bug does not seem to be in master. Riki
branch_bug.lyx
Description: application/lyx