MDL-46540 stats: missing include file

Thanks to Vadim Dvorovenko for finding a bug and providing a solution