Moved up the code that checks the java type of an order that it matches that of the order type - TRUNK-4389