Fatal error when routing to page that is not found

I have a route using a regex (simplified for posting reasons)

'/technologies/([^/]*)/gettingstarted/?': '/gettingstarted/$1'

When testing it out, hitting ‘technologies/analytics/gettingstarted’ will route properly to ‘/gettingstarted/analytics’. However, I if try and hit ‘technologies/ai/gettingstarted’ I am presented with:

a **Fatal error** : Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in  **/var/www/html/system/src/Grav/Common/Page/Pages.php**  on line  **511**

The routed result would be looking for ‘/gettingstarted/ai’, but that content does not exist. I was expecting to be returned with a 404 page.

Any help would be greatly appreciated.

Further investigation and it seems that on/around line 558 of system/src/Grav/common/Page/Pages.php will get stuck in a loop until memory exceeds. I have written a workaround in the file inside of this condition:

// Try Regex style routes
$site_routes = $config->get('site.routes');
if (is_array($site_routes)) {

But I am wondering if this is something that can be brought up with the Grav development staff.