Solving the bug when opening multiple files with same used sources

Signed-off-by: Benoit Brayer <brayer.benoit@gmail.com>