More optimizations for constants in methods.