fixed bug in equals of FunctionType, due to java.util.HashMap not implementing equals(), fixes #621