The Licensing (Scotland) Act 2005 doesn't prevent the presence of minors on licensed premises. A licensee is entitled to make their own rules about whether people under 18 (or indeed, any other age) are allowed in the bar but, equally, they're permitted to make exceptions. So there's no reason why the baby shouldn't have been in the bar.
Hygiene rules are usually very general. In effect, they simply state that the health of customers shouldn't be put at risk through the practices of the business owner. (There are plenty of 'codes of conduct' but they're not part of any legislation).
So, for example, it's a total myth that dogs aren't allowed in bars where food is being served. As long as there's no risk to customer's health, there's no legislation which bars dogs from pubs or restaurants.
Similarly there's no specific legislation which prevents the changing of a baby's nappy in a bar or restaurant. It would only be an offence if it could be established that it placed the health of customers (or staff) at risk.