fix #4688, inlining too early inside method definitions