[BUGFIX] Prevent duplicate empty lines for encapsLines