IDEMPIERE-6329 Bug in BOM* SQL functions not getting the correct BOM children (#2586)- fix as suggested by Vitor Santos at mattermost