Fix build outside sources and header conflicts