GROOVY-5473 fix staticmathod calls done on instances