Is this situation really better under the current law though? If you change the situation so that B had the idea first, but the rest of the facts are the same, then the current law produces the same problems.
The reason I suspect my situation is more common than the one you describe, if the first two lines are chronologically reversed, is that the time it takes A to go from idea to practical product and filed patent is assumed to be greater than the time it takes B to go from idea to filed patent, since B didn't wait until he had a marketable product before filing. This new system gives B a corresponding advantage over A.
Perhaps another assumption is that by the time the seeds for an idea are drifting in the ether, A would be more attuned to receive them, and would have started before B.
Though of course the situation you describe should be addressed, this change in policy may be an additional check against abuse that we are losing.