[Bug 40128] Wrong logic in print once