I found several bugs in the PolynomialBasis class when using (higher order) partial derivatives in three dimensions.
The Errors can be reproduced by changing line 28 (or any of the corresponding lines below) of localfunctions/test/raviartthomaselementtest.cc to
TEST_FE3(rt0simplex3dlfem, DisableNone, 2);
Fixes:
q<hsize
assertion moved before increment