I've just done a little test with my Metz 59 AF-2.
I place the camera such that there is a nearby object at about 1 metre distance, this is in the lower right of the corner, illuminated very brightly in the centre photograph.
The Metz flash is in slave mode and is actually standing on that same object. You can see the flash (although out of focus) at the middle right of each photo, brightly illuminated in the middle one.
The background is about 5 metres from the camera.
In the middle picture the on board flash is set to fire (option 1) and the result can be seen as it brightly illuminates the nearby object as well as the back of the Metz Flash which is sitting on top of it.
In the left and right pictures the internal flash is set to off (option 2). In the left picture one can see that some light is still emitted and illuminates the nearby object somewhat, but still less than what would be needed for a good exposure. In my opinion it is doing its job properly as the object is very close and yet is still only marginally illuminated by the unwanted light.
In the right picture I shielded the internal flash such that none of its light would reach the nearby object and as a result the nearby object appears much darker, confirming that the marginal illumination in the first test was actually from the onboard flash.
So the onboard flash
is illuminating but it doesn't seem bright enough to cause any problems except in some extreme situations.
I remember the K-r being quite weak at triggering the remote flash so probably Pentax were aware of that and pumped up the power in the K-30 to make sure that the slave flash does in fact trigger. There is of course the downside of the unwanted light but I guess compromises have to be made.
There is a way that could get round this problem but it would need firmware upgrade of both the flash and the camera. In hindsight what they could have done is to time things such that the trigger burst is fired a specific time before the shutter opens and the flash knows to wait that specific time to fire only after the shutter opens. Now someone will steal that idea and go get a patent for it.