Logic does not seem to check for the correct amount of masks to be available to access the Moon Trials.
Having enough masks to trade in and not trading in does let you access the trials as intended but not having enough masks to trade in won't let you access them.
If not enough masks are acquired, talking to one of the moon children results in the following dialogue:
"... Ahh... Nice weather...Isn't it? The kid sitting beneath the tree... He's calling you..."
without giving access to the related Trial Room.