Adding rule for nested functions.