Fix for removing not included files from a compilation database.

remove_if doesn't alter the container properties. Need to use erase to remove
the elements past the new end.