An investigation has been launched into how the BBC came to prominently feature the son of a Hamas official in its documentary on Gaza.