Monkey patching core classes without using module as smart dependency does not work well with moduled definition