Johannes Geiger, I've taken your classes as you've outlined them here and I couldn't reproduce the failure on 5.2.2.Final nor master. Would you mind attaching a runnable test case, of which you can find templates here.
Thanks!