That's a rather long-standing problem, namely issue 630
<URL:https://code.google.com/p/lilypond/issues/detail?id=630> reported
more than 7 years ago but likely present for more than 10 years (See
<URL:http://lilypond.org/doc/v2.6/input/regression/collated-files.html#property-grace-polyphony.ly>
where the stems of the quarter notes should be in different directions).
The good news is that it has been fixed last October in version 2.19.16.
The fix involved a fair amount of code, including C++ code. So there is
no reasonable hope to get something equivalent working in
version 2.18.2: the only reasonable cure is upgrading.
Yes, it is embarrassing that this bug persisted for so long.
--
David Kastrup